package com.example.springmvcinterceptor.sertletComponent;

import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
@Component
public class MyListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("这是contextDestroyed执行");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("这是contextDestroyed执行");
    }
}
